package org.scau.studentevaluation.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.scau.studentevaluation.config.global.log.WebLog;
import org.scau.studentevaluation.entity.YbUserQuery;
import org.scau.studentevaluation.entity.YbUserVO;
import org.scau.studentevaluation.service.IYbUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: x1aolone
 * @Date: 2020/9/1 14:42
 */
@Slf4j
@RestController
@Api("YbUser控制器")
@WebLog("YbUser控制器")
public class YbUserController {

    @Autowired
    public IYbUserService ybUserService;

    @PostMapping("/insertYbUser")
    @ApiOperation("新增YbUser")
    public YbUserVO insertYbUser(YbUserQuery query){
        return ybUserService.insertYbUser(query);
    }

    @GetMapping("/login")
    @ApiOperation("登录，返回登录成功的用户信息")
    public YbUserVO login(YbUserQuery query){
        return ybUserService.login(query);
    }


}
